﻿using System.Collections.Generic;

namespace DBProvider.Providers
{
	public interface ISurveyProvider
	{
		Survey CreateSurvey(Survey theNewSurvey, out string msg);
		bool DeleteSurvey(int surveyID);
		bool UpdateSurvey(Survey theSurvey);
		Survey GetSurvey(int theSurveyID);
		List<Survey> GetAllSurvey(int drugStoreID);
		List<Survey> GetAllSurvey(int drugStoreID, int pageIndex, int pageSize, out int totalRecords);
		List<Survey> GetAllSurvey(int userID, int drugStoreID, int pageIndex, int pageSize, out int totalRecords);

		SurveyQuestion CreateSurveyQuestion(SurveyQuestion theNewSurveyQuestion, out string msg);
		bool DeleteSurveyQuestion(int theSurveyQuestionID);
		bool UpdateSurveyQuestion(SurveyQuestion theSurveyQuestion);
		List<SurveyQuestion> GetSurveyQuestionBySurvey(int theSurveyID);
		SurveyQuestion GetSurveyQuestion(int theSurveyQuestionID);

		SurveyQuestionItem CreateSurveyQuestionItem(SurveyQuestionItem theNewSurveyQuestionItem, out string msg);
		bool DeleteSurveyQuestionItem(int theSurveyQuestionItemID);
		bool UpdateSurveyQuestionItem(SurveyQuestionItem theSurveyQuestionItem);
		List<SurveyQuestionItem> GetSurveyQuestionItemByQuestion(int surveyQuestionID);
		bool DeleteSurveyQuestionItemByQuestion(int theSurveyQuestionID);
		List<SurveyQuestionItem> GetSurveyQuestionItemBySurvey(int surveyID);

		SurveyAnswer CreateSurveyAnswer(SurveyAnswer theNewSurveyAnswer, out string msg);
		List<SurveyAnswer> GetSurveyAnswer(int userID, int questionID);
		List<SurveyAnswer> GetSurveyAnswerBySurvey(int surveyID);
		bool SaveSurveyAnswers(List<SurveyAnswer> lstSurveyAnswer);

		List<RLT_SurveyAndShareTo> GetSurveyAndShareToBySurvey(int surveyID);
		void CreateSurveyAndShareTo(List<RLT_SurveyAndShareTo> lstSurveyAndShareTo);
		void SaveSurveyAndShareTo(int surveyID, List<RLT_SurveyAndShareTo> lstSurveyAndShareTo);
	}
}
